Replace assert_precondition with assert_implements in event-timing/ assert_precondition is deprecated (see https://github.com/web-platform-tests/rfcs/blob/master/rfcs/assert_precondition_rename.md). Since PerformanceElementTiming is not an OPTIONAL part of the Element Timing spec and EventCount is not an OPTIONAL part of the Event Timing spec, these tests should use assert_implements.
diff --git a/event-timing/buffered-flag.html b/event-timing/buffered-flag.html index dc70ff2..7ee152b 100644 --- a/event-timing/buffered-flag.html +++ b/event-timing/buffered-flag.html
@@ -12,7 +12,7 @@ let firstInputSeen = false; let eventSeen = false; async_test(t => { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); const validateEntry = t.step_func(entry => { if (entry.entryType === 'first-input') firstInputSeen = true; diff --git a/event-timing/click-timing.html b/event-timing/click-timing.html index 376372a..4544734 100644 --- a/event-timing/click-timing.html +++ b/event-timing/click-timing.html
@@ -21,7 +21,7 @@ let timeAfterSecondClick; let observedEntries = []; async_test(function(t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); new PerformanceObserver(t.step_func(entryList => { observedEntries = observedEntries.concat(entryList.getEntries().filter( entry => entry.name === 'mousedown')); diff --git a/event-timing/crossiframe.html b/event-timing/crossiframe.html index 55e2bec..7114086 100644 --- a/event-timing/crossiframe.html +++ b/event-timing/crossiframe.html
@@ -48,7 +48,7 @@ } promise_test(async t => { - assert_precondition(window.PerformanceEventTiming, "Event Timing is not supported"); + assert_implements(window.PerformanceEventTiming, "Event Timing is not supported"); clickTimeMin = performance.now(); let observedEntries = false; const observerPromise = new Promise(resolve => { diff --git a/event-timing/event-click-counts.html b/event-timing/event-click-counts.html index 034e172..d4e87c5 100644 --- a/event-timing/event-click-counts.html +++ b/event-timing/event-click-counts.html
@@ -10,7 +10,7 @@ <button id='button'>Click me</button> <script> promise_test( t => { - assert_precondition(window.EventCounts, "Event Counts isn't supported"); + assert_implements(window.EventCounts, "Event Counts isn't supported"); function testClicks(expectedCount, resolve) { const clickCount = performance.eventCounts.get('click'); if (clickCount < expectedCount) { diff --git a/event-timing/event-counts-zero.html b/event-timing/event-counts-zero.html index 0cc9e2e..3ec90dd 100644 --- a/event-timing/event-counts-zero.html +++ b/event-timing/event-counts-zero.html
@@ -8,7 +8,7 @@ <script src=/resources/testdriver-vendor.js></script> <script> test(() => { - assert_precondition(window.EventCounts, "Event Counts isn't supported"); + assert_implements(window.EventCounts, "Event Counts isn't supported"); const eventTypes = [ 'auxclick', 'click', diff --git a/event-timing/only-observe-firstInput.html b/event-timing/only-observe-firstInput.html index ad71153..54a6036 100644 --- a/event-timing/only-observe-firstInput.html +++ b/event-timing/only-observe-firstInput.html
@@ -20,7 +20,7 @@ PerformanceObserver should observe one and only one entry. */ async_test(function(t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); let hasObservedFirstInput = false; new PerformanceObserver(t.step_func((entryList) => { assert_false(hasObservedFirstInput); diff --git a/event-timing/programmatic-click-not-observed.html b/event-timing/programmatic-click-not-observed.html index 1c2921c..0a189b0 100644 --- a/event-timing/programmatic-click-not-observed.html +++ b/event-timing/programmatic-click-not-observed.html
@@ -18,7 +18,7 @@ delayCalled = true; } async_test(function(t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); const observer = new PerformanceObserver(t.step_func_done((entryList) => { const entries = entryList.getEntries().filter(e => e.name === 'mousedown'); // There must only be one click entry: from the clickAndBlockMain() call. diff --git a/event-timing/retrievability.html b/event-timing/retrievability.html index d2b6da2..087cd13 100644 --- a/event-timing/retrievability.html +++ b/event-timing/retrievability.html
@@ -30,7 +30,7 @@ Validate entries */ async_test(function(t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); new PerformanceObserver(t.step_func_done(() => { validateEntries(); t.done(); diff --git a/event-timing/retrieve-firstInput.html b/event-timing/retrieve-firstInput.html index acff788..27b17cd 100644 --- a/event-timing/retrieve-firstInput.html +++ b/event-timing/retrieve-firstInput.html
@@ -12,7 +12,7 @@ <script> async_test(function(t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); function testEntries() { // First callback is not ensured to have the entry. if (performance.getEntriesByType('first-input').length === 0) { diff --git a/event-timing/timingconditions.html b/event-timing/timingconditions.html index 02da297..12280cb 100644 --- a/event-timing/timingconditions.html +++ b/event-timing/timingconditions.html
@@ -35,7 +35,7 @@ } async_test(function(t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); new PerformanceObserver(t.step_func_done(entryList => { const observerCallbackTime = performance.now(); const entries = entryList.getEntries().filter( diff --git a/event-timing/toJSON.html b/event-timing/toJSON.html index a11073a..a2d7df4 100644 --- a/event-timing/toJSON.html +++ b/event-timing/toJSON.html
@@ -10,7 +10,7 @@ <button id='button'>Generate a 'click' event</button> <script> async_test(function (t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { const entry = entryList.getEntries()[0];